package com.xxx.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 登录表
 * </p>
 *
 * @author jh
 * @since 2025-08-30
 */
@TableName("t_login")
@Data
public class Login extends Model<Login> {

    public static final Integer TYPE_USER = 1;//前台
    private static final long serialVersionUID = 1L;
    private static final Integer  TYPE_ADMIN= 0;  //后台


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String username;
    private String password;
    /**
     * 0是后台，1是前台
     */
    private Integer type;
    private Boolean enabled;
    @TableField("account_non_expired")
    private Boolean accountNonExpired;
    @TableField("credentials_non_expired")
    private Boolean credentialsNonExpired;
    @TableField("account_non_locked")
    private Boolean accountNonLocked;
    /**
     * 对应Oauth2客户端详情ID
     */
    @TableField("client_id")
    private String clientId;
    @TableField("client_secret")
    private String clientSecret;
    private String avatar;



    @Override
    protected Serializable pkVal() {
        return this.id;
    }


}
